Analyzes document images and determines whether they are negatives (light data on a dark background) or normal (dark data on a light background). This operation works on all color depths supported by the opcode.
The uncompressed image to be analyzed must reside in the Get Queue prior to REQ_EXEC. Typically, the image will be fully contained in the Get Queue, but that is not a requirement. This operation will not produce an output image.
- Subcode is set to SF_SUBCODE_DETECT_NEGATIVE_PAGE (20).
- DetectionQuality is set from 0 to 100, with 0 causing detection to run as fast as possible and 100 causing detection to be as careful and accurate as possible. 50 is a good default value.
- Stride is set to the image line width in bytes including padding at the end of the line width or to 0. If Stride is 0 and PF_NoDibPad is set in PicFlags, the operation will compute the stride using: [ (PixelWidth*BitCount)/8 ]. If Stride is 0 and PF_NoDibPad is not set in PicFlags, the operation will compute the stride using: [ (((PixelWidth*BitCount)+31)&(~31))/8 ].
This operation does not produce an output image. Instead, the output is stored back into the PIC_PARM structure in the following locations.
- Confidence is set, during REQ_EXEC, from 0 to 100 with 0 indicating that u.SC20.IsNormal is probably not correct and 100 indicating that the detected result is almost certainly correct. Values above 70 usually indicate accurate results and values below 50 frequently indicate incorrect results. Depending on the needs of the application, this value can be used to recognize and redirect problem images before too much time is invested in them.
- u.SC20.IsNormal is set, during REQ_EXEC, to indicate whether the image is negative or normal. 1 indicates normal (dark on light) and 0 indicates negative (light on dark).